package com.yunfeng.supercall.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;

import com.yunfeng.supercall.R;
import com.yunfeng.supercall.bean.ShareConfigBean;
import com.yunfeng.supercall.bean.SuperFriendsBean;

/**
 * 不是好友的情况下的界面
 * 
 * @author 洋
 * 
 */
public class NotAFriendsActivity extends BaseActivity {

	private SuperFriendsBean mSuperFriends;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_not_a_friends);
		mSuperFriends = getIntent().getParcelableExtra(KEY_DATA);
		setTextViewText(R.id.nick_name, mSuperFriends.getNick_name());
		setTextViewText(R.id.phone,
				getString(R.string.phone_number, mSuperFriends.getPhone()));
	}

	public void invite(View v) {
		Intent i = new Intent(Intent.ACTION_SENDTO);
		i.setData(Uri.parse("smsto:" + mSuperFriends.getPhone()));
		i.putExtra("sms_body", ShareConfigBean.sConfig.getContent()
				+ getLoginManager(getActivity()).getRegUrl());
		startActivity(i);
	}
}
